<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>科情服务 - 新建</title>
<meta name="description" content="新建科情服务任务单">
<meta name="keywords" content="科情服务">
<meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/bootstrap/css/bootstrapValidator.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/ionicons/css/ionicons.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/iCheck/square/blue.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/morris/morris.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/jvectormap/jquery-jvectormap-1.2.2.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/datepicker/datepicker3.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/daterangepicker/daterangepicker.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/datatables/dataTables.bootstrap.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/treeTable/jquery.treetable.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/treeTable/jquery.treetable.theme.default.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/select2/select2.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/colorpicker/bootstrap-colorpicker.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/bootstrap-markdown/css/bootstrap-markdown.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/adminLTE/css/AdminLTE.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/adminLTE/css/skins/_all-skins.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/ionslider/ion.rangeSlider.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/ionslider/ion.rangeSlider.skinNice.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/bootstrap-slider/slider.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.css">
</head>

<body class="hold-transition skin-purple sidebar-mini">
<div class="wrapper">
	<!-- 页面头部 -->
	<jsp:include page="header.jsp"></jsp:include>
	<!-- 页面头部 /-->
	<!-- 导航侧栏 -->
	<jsp:include page="aside.jsp"></jsp:include>
	<!-- 导航侧栏 /-->
	<!-- 内容区域 -->
	<div class="content-wrapper">
		<!-- 内容头部 -->
		<section class="content-header">
			<h1>
				数据录入管理 <small>科情服务任务单</small>
			</h1>
			<ol class="breadcrumb">
				<li><a href="${pageContext.request.contextPath}/index.jsp"><i
						class="fa fa-dashboard"></i> 首页</a></li>
				<li><a
						href="${pageContext.request.contextPath}/kqfw/findTask.do">数据录入管理</a></li>
				<li class="active">新建科情服务任务单</li>
			</ol>
		</section>
		<!-- 内容头部 /-->
		<form action="${pageContext.request.contextPath}/kqfw/addTask.do" id="kqfwForm" method="post">
			<!-- 正文区域 -->
			<div class="panel panel-default" style="border: none;">
                <div class="row data-type" style="background-color: #ececec;">
                    <h1 style="text-align: center;font-size: 18px;margin-bottom: 20px;">科情服务任务单</h1>
                </div>
				<div class="row data-type">
					<div class="col-md-2 col-lg-2 col-xs-2 col-sm-2 title">编号</div>
					<div class="col-md-10 col-lg-10 col-xs-10 col-sm-10 data">
						<input type="text" class="form-control" name="number" placeholder="Auto" readonly="true">
					</div>
                </div>
                <div class="row data-type">
					<div class="col-md-2 col-lg-2 col-xs-2 col-sm-2 title">任务名称</div>
                    <div class="form-group">
						<div class="col-md-10 col-lg-10 col-xs-10 col-sm-10 data">
							<input type="text" class="form-control" name="taskname">
						</div>
                    </div>

                </div>
                <div class="row data-type">
					<div class="col-md-2 col-lg-2 col-xs-2 col-sm-2 title">单位</div>
					<div class="col-md-4 col-lg-4 col-xs-4 col-sm-4 data">
						<input type="text" class="form-control" name="organization">
					</div>
					<div class="col-md-2 col-lg-2 col-xs-2 col-sm-2 title">联系人</div>
					<div class="col-md-4 col-lg-4 col-xs-4 col-sm-4 data">
						<input type="text" class="form-control" name="linkman">
					</div>
                </div>
                <div class="row data-type">
					<div class="col-md-2 col-lg-2 col-xs-2 col-sm-2 title">联系电话</div>
					<div class="col-md-4 col-lg-4 col-xs-4 col-sm-4 data">
						<input type="text" class="form-control" name="telephone" placeholder="办公电话/手机">
					</div>
					<div class="col-md-2 col-lg-2 col-xs-2 col-sm-2 title">下达时间</div>
					<div class="col-md-4 col-lg-4 col-xs-4 col-sm-4 data">
							<input type="date" class="form-control"
								   id="datepicker-a3" name="givetime">
						</div>
					</div>
                </div>

                <div class="row data-type">
					<div class="col-md-2 col-lg-2 col-xs-2 col-sm-2 title">完成时限（/天）</div>
					<div class="col-md-4 col-lg-4 col-xs-4 col-sm-4 data">
						<input type="text" class="form-control" name="timelimit" placeholder="不能小于5天">
					</div>
					<div class="col-md-2 col-lg-2 col-xs-2 col-sm-2 title">任务类型</div>
					<div class="col-md-4 col-lg-4 col-xs-4 col-sm-4 data">
						<select class="form-control select2" style="width: 100%"
								name="tasktype">
							<option value="0" selected="selected">资料收集</option>
							<option value="1">科技查新</option>
							<option value="2">前沿动态分析整编</option>
							<option value="3">"信息专员"服务</option>
							<option value="4">团队学术影响力分析</option>
							<option value="5">其他</option>
						</select>
					</div>
                </div>

                <div class="row data-type">
					<div class="col-md-2 col-lg-2 col-xs-2 col-sm-2 title">中英文关键词</div>
					<div class="col-md-10 col-lg-10 col-xs-10 col-sm-10 data">
						<input type="text" class="form-control" name="keywords">
					</div>
                </div>

                <div class="row data-type">
					<div class="col-md-2 col-lg-2 col-xs-2 col-sm-2 title rowHeight2x">任务背景</div>
					<div class="col-md-10 col-lg-10 col-xs-10 col-sm-10 data rowHeight2x">
						<textarea class="form-control" rows="2" name="taskbackground"></textarea>
					</div>
                </div>

                <div class="row data-type">
					<div class="col-md-2 col-lg-2 col-xs-2 col-sm-2 title rowHeight2x">任务简述</div>
					<div class="col-md-10 col-lg-10 col-xs-10 col-sm-10 data rowHeight2x">
						<textarea class="form-control" rows="2" name="taskmark"></textarea>
					</div>
                </div>

                <div class="row data-type">
					<div class="col-md-2 col-lg-2 col-xs-2 col-sm-2 title rowHeight2x">具体要求</div>
					<div class="col-md-10 col-lg-10 col-xs-10 col-sm-10 data rowHeight2x">
						<textarea class="form-control" rows="2" name="specification"></textarea>
					</div>
                </div>

                <div class="row data-type">
					<div class="col-md-2 col-lg-2 col-xs-2 col-sm-2 title rowHeight8x">任务完成情况</div>
					<div class="col-md-10 col-lg-10 col-xs-10 col-sm-10 data rowHeight8x">
                        <textarea class="form-control" rows="4" name="taskInfo"></textarea>
						<table class="table table-bordered table-striped table-hover dataTable">
							<thead>
							<tr>
								<th class="text-center">完成人</th>
								<th class="text-center">部职别</th>
								<th class="text-center">任务分工</th>
								<th class="text-center">操作</th>
							</tr>
							<tr>
								<th><a class="btn-default" onclick="addTR()" style="display:block;cursor: pointer;height: 30px;width: 80px;line-height: 30px;text-align: center">新增一项</a></th>
							</tr>
							</thead>
							<tbody class="tb">
							<tr>
								<td>
									<input type="text" class="form-control" name="person_in_charge">
								</td>
								<td>
									<input type="text" class="form-control" name="level">
								</td>
								<td>
									<input type="text" class="form-control" name="task_allocation">
								</td>
								<td class="text-center">
									<a class="btn-default" onclick="deleteTR(this)"><i class="fa fa-trash fa-2x" aria-hidden="true"></i> </a>
								</td>
							</tr>
							</tbody>
						</table>
					</div>
                </div>

                <div class="row data-type">
					<div class="col-md-2 col-lg-2 col-xs-2 col-sm-2 title rowHeight2x">任务反馈</div>
					<div class="col-md-10 col-lg-10 col-xs-10 col-sm-10 data rowHeight2x">
						<textarea class="form-control" rows="3" name="taskfeedback"></textarea>
					</div>
				</div>


			<!--工具栏-->
			<div class="box-tools text-center">
				<button type="submit" class="btn bg-maroon">保存</button>
				<button type="button" class="btn bg-default"
						onclick="history.back(-1);">返回</button>
			</div>
			<!--工具栏/-->
			<!-- 正文区域 /-->
		</form>
		</div>
		<!-- 内容区域 /-->
		<!-- 底部导航 -->
		<jsp:include page="footer.jsp"></jsp:include>
		<!-- 底部导航 /-->
		</div>
	<script src="${pageContext.request.contextPath}/plugins/jQuery/jquery-2.2.3.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/jQueryUI/jquery-ui.min.js"></script>
	<script>
		$.widget.bridge('uibutton', $.ui.button);
	</script>
	<script src="${pageContext.request.contextPath}/plugins/bootstrap/js/bootstrap.min.js"></script>
    <script src="${pageContext.request.contextPath}/plugins/bootstrap/js/bootstrapValidator.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/raphael/raphael-min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/morris/morris.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/sparkline/jquery.sparkline.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/knob/jquery.knob.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/daterangepicker/moment.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/daterangepicker/daterangepicker.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/daterangepicker/daterangepicker.zh-CN.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/datepicker/bootstrap-datepicker.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/slimScroll/jquery.slimscroll.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/fastclick/fastclick.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/iCheck/icheck.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/adminLTE/js/app.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/treeTable/jquery.treetable.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/select2/select2.full.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/colorpicker/bootstrap-colorpicker.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/bootstrap-wysihtml5/bootstrap-wysihtml5.zh-CN.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/bootstrap-markdown/js/bootstrap-markdown.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/bootstrap-markdown/locale/bootstrap-markdown.zh.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/bootstrap-markdown/js/markdown.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/bootstrap-markdown/js/to-markdown.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/ckeditor/ckeditor.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/input-mask/jquery.inputmask.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/input-mask/jquery.inputmask.date.extensions.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/input-mask/jquery.inputmask.extensions.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/datatables/jquery.dataTables.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/datatables/dataTables.bootstrap.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/chartjs/Chart.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/flot/jquery.flot.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/flot/jquery.flot.resize.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/flot/jquery.flot.pie.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/flot/jquery.flot.categories.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/ionslider/ion.rangeSlider.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/bootstrap-slider/bootstrap-slider.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>

	<script>
		//设置新增列表选项
		function addTR(){
			var objTR = $(".tb");
			objTR.append("<tr><td><input type='text' class='form-control' name='person_in_charge'></td><td><input type='text' class='form-control' name='level'></td><td><input type='text' class='form-control' name='task_allocation'></td><td class='text-center'><a class='btn-default' onclick='deleteTR(this)'><i class='fa fa-trash fa-2x' aria-hidden='true'></i> </a></td></tr>")
		}
		//删除列表项目
		function deleteTR(ts){
			$(ts).parent().parent().remove();
		}
		$('#kqfwForm').bootstrapValidator({
			message: 'This value is not valid',
			feedbackIcons: {
				valid: 'glyphicon glyphicon-ok',
				invalid: 'glyphicon glyphicon-remove',
				validating: 'glyphicon glyphicon-refresh'
			},
			fields: {
				taskname: {
					message: '任务名称验证失败',
					validators: {
						notEmpty: {
							message: '任务名称不能为空'
						},
					}
				},
				organization:{
					message:'单位验证失败',
					validators:{
						notEmpty:{
							message:'单位不能为空'
						}
					}
				},
				linkman:{
					message:'联系人验证失败',
					validators:{
						notEmpty:{
							message:'联系人不能为空'
						}
					}
				},
				telephone:{
					message:'联系电话验证失败',
					validators:{
						notEmpty:{
							message:'联系电话不能为空'
						},
						stringLength:{
							max:11,
							message:'联系电话最少6位，最长11位'
						}
					}
				},
				timelimit: {
					message: '完成时限验证失败',
					validators: {
						notEmpty: {
							message: '完成时限不能为空'
						},
						digits:{
							message:'该值单位为天，只填数字即可'
						},
						greaterThan:{
							value : 5,
							message:'完成时限不能小于五天'
						}
					}
				},
				givetime: {
					message: '下达时间验证失败',
					validators: {
						notEmpty: {
							message: '下达时间不能为空'
						},
						regexp:{
							regexp:/[0-9]{4}-[0-9]{2}-[0-9]{2}/,
							message:'请填入xxxx-xx-xx（如2021-01-01）的日期格式'
						}
					}
				},
				tasktype:{
					message: '任务类型验证失败',
					validators: {
						notEmpty: {
							message: '任务类型不能为空'
						}
					}
				},
				keywords:{
					message: '中英文关键词验证失败',
					validators: {
						notEmpty: {
							message: '中英文关键词不能为空'
						}
					}
				},
				taskbackground:{
					message: '任务背景验证失败',
					validators: {
						notEmpty: {
							message: '任务背景不能为空'
						}
					}
				},
				taskmark:{
					message: '任务简述验证失败',
					validators: {
						notEmpty: {
							message: '任务简述不能为空'
						}
					}
				},
				specification:{
					message: '具体要求失败',
					validators: {
						notEmpty: {
							message: '具体要求不能为空'
						}
					}
				}

			}
		});
	</script>


</body>

</html>